package com.itheima.api.array.demo03;

import java.util.Scanner;

public class DiGuiDemo {

    public static void main(String[] args) {

        System.out.println(fac(2));
    }

    public static int fac(int i){

        if (i == 1){
            return 1;
        } else {
            return i * fac(i - 1);
        }
    }
}
